package gggone

class User {
	
	String benutzername
	byte [] password
	byte [] password_wiederholung
	String vorname
	String nachname
	String strasse
	Integer plz
	String ort
	String land
	String email
	String geburtstag
	long kontonr
	long blz
	String bank
				
	static constraints = {
		
		vorname (blank:false, nullable:false, maxLength: 40, matches:"[a-zA-Z]+")
		nachname (blank:false, nullable:false, maxLength: 40, matches:"[a-zA-Z]+")
		strasse (blank: false, nullable: false, maxLength: 40)
		plz (blank: false, nullable: false, max:99999)
		ort (blank: false, nullable: false, maxLength: 40)
		land (blank: false, nullable: false)
		geburtstag (blank: false, nullable: false)
		benutzername (blank:false, nullable:false, maxLength:20, matches:"[a-zA-Z]+", unique:true)
		email (blank: false, nullable: false, maxLength: 50, email:true, unique: true)
		password (blank:false,nullable:false, minLength: 8, maxLength: 15)
		password_wiederholung (blank:false,nullable:false)
		kontonr (blank:false, nullable:false, minLength:6, maxLength: 11)
		blz (blank:false, nullable:false, minLength: 8, maxLength: 8)
		bank (blank:false, nullable:false, maxLength: 40)
				
	}//constraints
	
	static hasMany = [angebot:Angebot] // one-to-many relationship to Angebot
	
}//class
